package cn.cque.dao;

import cn.cque.entity.Category;
import cn.cque.entity.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @author: XWC
 * @ClassName: ProductDao
 * @Date: 2020/10/4
 * @Time: 21:59
 * @Description:
 */
public interface ProductDao {

    Product findById(@Param("pid") String id);

    List<Product> findHot(@Param("isHot") int isHot);

    List<Product> findNew();

    List<Product> findByCid(@Param("cid") String cid);

    List<Product> findAll();

    Integer addProduct(Product product);

    Integer deleteProduct(@Param("pid") String id);

    Integer updateProduct(Product product);
}